package co.yixiang.modules.system.rest;

import co.yixiang.annotation.AnonymousAccess;
import co.yixiang.domain.PageResult;
import co.yixiang.logging.aop.log.Log;
import co.yixiang.modules.system.service.dto.YxStudentScoreDto;
import co.yixiang.modules.system.service.dto.YxStudentScoreQueryCriteria;
import co.yixiang.modules.system.utils.ChatCompletionsExample;
import io.swagger.annotations.ApiOperation;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@RequestMapping("/api/deepseek")
@RestController
public class ChatController {


    @PostMapping("/quiz")
    @ApiOperation("提问")
    @AnonymousAccess
    public ResponseEntity<Map<String,String>> quiz(@RequestBody Map<String, String> map) {
        String result = ChatCompletionsExample.questionAll(map.get("question"));
        map.put("result",result);
        return new ResponseEntity<>(map, HttpStatus.OK);
    }
}
